home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / Errors.r < prev    next >
Encoding:
Text File  |  1994-03-12  |  16.0 KB  |  389 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // Errors.r
  3.  
  4. #ifndef __ERRORGLOBALS__
  5. #include "ErrorGlobals.h"
  6. #endif
  7.  
  8. #ifndef __MACTCPCOMMONTYPES__
  9. /* MacTCP return Codes in the range -23000 through -23049 */
  10. #    define ipBadLapErr                        -23000            /* bad network configuration */
  11. #    define ipBadCnfgErr                        -23001            /* bad IP configuration error */
  12. #    define ipNoCnfgErr                        -23002            /* missing IP or LAP configuration error */
  13. #    define ipLoadErr                            -23003            /* error in MacTCP load */
  14. #    define ipBadAddr                            -23004            /* error in getting address */
  15. #    define connectionClosing            -23005            /* connection is closing */
  16. #    define invalidLength                    -23006
  17. #    define connectionExists                -23007            /* request conflicts with existing connection */
  18. #    define connectionDoesntExist    -23008            /* connection does not exist */
  19. #    define insufficientResources    -23009            /* insufficient resources to perform request */
  20. #    define invalidStreamPtr                -23010
  21. #    define streamAlreadyOpen            -23011
  22. #    define connectionTerminated        -23012
  23. #    define invalidBufPtr                    -23013
  24. #    define invalidRDS                            -23014
  25. #    define invalidWDS                            -23014
  26. #    define openFailed                            -23015
  27. #    define commandTimeout                    -23016
  28. #    define duplicateSocket                -23017
  29. # define nameSyntaxErr                     -23041        
  30. # define cacheFault                            -23042
  31. # define noResultProc                        -23043
  32. # define noNameServer                        -23044
  33. # define authNameErr                        -23045
  34. # define noAnsErr                                -23046
  35. # define dnrErr                                    -23047
  36. # define outOfMemory                        -23048
  37. #endif
  38.  
  39. // OPERATION table
  40. resource 'errs' (1130, "operation table", purgeable) {{
  41.     whichList, 0, kTNewsApplMessageStrings;
  42.     messageOpenGroupFailedRez,                messageOpenGroupFailedRez, 1;
  43.     messageGetGroupListFailedRez,            messageGetGroupListFailedRez, 2;
  44.     messageUpdateGroupListFailedRez,    messageUpdateGroupListFailedRez, 3;
  45.     messageUseNewNewsServerRez,                messageUseNewNewsServerRez, 4;
  46.     messageUpdateGroupFailedRez,            messageUpdateGroupFailedRez, 5;
  47.     messageUpdateServerIPRez,                    messageUpdateServerIPRez, 6;
  48.  
  49.     whichList, 0, kPrefsMessageStrings;
  50.     messageUsePrefsRez,                                messageUsePrefsRez, 1;
  51.     messageOpenPrefsFailedRez,                messageOpenPrefsFailedRez, 2;
  52.     messageReadPrefsFailedRez,                messageReadPrefsFailedRez, 3;
  53.     messageWritePrefsFailedRez,                messageWritePrefsFailedRez, 4;
  54.     
  55.     whichList, 0, kArticleViewMessageStrings;
  56.     messageShowArticlesFailedRez,            messageShowArticlesFailedRez, 1;
  57.     messageLaunchExtractorFailedRez,    messageLaunchExtractorFailedRez, 2;
  58.     messageExpandArticleRez,                    messageExpandArticleRez, 3;
  59.     messageSaveNotesRez,                            messageSaveNotesRez, 4;
  60.     messageOpenNotesFileRez,                    messageOpenNotesFileRez, 5;
  61.     
  62.     whichList, 0, kTExtractBinariesMessageStrings;
  63.     messageCannotExtractBinariesRez,    messageCannotExtractBinariesRez, 1;
  64.     
  65.     whichList, 0, kSaveArticlesErrorStrings;
  66.     messageCannotSaveFilesRez,                 messageCannotSaveFilesRez, 1;
  67.  
  68.     whichList, 0, kTPostMessageStrings;
  69.     messageCouldNotPostArticleRez,         messageCouldNotPostArticleRez, 1;
  70.     messageLaunchEditorFailedRez,            messageLaunchEditorFailedRez, 2;
  71.     messageCouldNotPostRez,                        messageCouldNotPostRez, 3;
  72.     messageSignatureProblemRez,                messageSignatureProblemRez, 4;
  73.     messageTrashPostedDocumentRez,        messageTrashPostedDocumentRez, 5;
  74.  
  75.     whichList, 0, kMailMessageStrings;
  76.     messageReplyWithLetterRez,                messageReplyWithLetterRez, 1;
  77.     msgLaunchEudoraRez,                                msgLaunchEudoraRez, 2;
  78.     messageCancelArticleRez,                    messageCancelArticleRez, 3;
  79.  
  80.     whichList, 0, kMacTCPMessageStrings;
  81.     messageCannotOpenMacTcpRez,                messageCannotOpenMacTcpRez, 1;    
  82. }};
  83.  
  84. // REASON table
  85. resource 'errs' (1128, "reason table", purgeable) {{
  86.     whichList, 0, kMacTCPErrorStrings;
  87.     ipBadLapErr,                                    ipBadLapErr, 1;
  88.     ipBadCnfgErr,                                    ipBadCnfgErr, 2;
  89.     ipNoCnfgErr,                                    ipNoCnfgErr, 3;
  90.     ipLoadErr,                                        ipLoadErr, 4;
  91.     ipBadAddr,                                        ipBadAddr, 5;
  92.     connectionClosing,                        connectionClosing, 6;
  93.     invalidLength,                                invalidLength, 7;
  94.     connectionExists,                            connectionExists, 8;
  95.     connectionDoesntExist,                connectionDoesntExist, 9;
  96.     insufficientResources,                insufficientResources, 10;
  97.     invalidStreamPtr,                            invalidStreamPtr, 11;
  98.     streamAlreadyOpen,                        streamAlreadyOpen, 12;
  99.     connectionTerminated,                    connectionTerminated, 13;
  100.     invalidBufPtr,                                invalidBufPtr, 14;
  101.     invalidRDS,                                        invalidRDS, 15;
  102.     openFailed,                                        openFailed, 16;
  103.     commandTimeout,                                commandTimeout, 17;
  104.     duplicateSocket,                            duplicateSocket, 18;
  105.     nameSyntaxErr,                                nameSyntaxErr, 19;
  106.     cacheFault,                                        cacheFault, 20;
  107.     noResultProc,                                    noResultProc, 21;
  108.     noNameServer,                                    noNameServer, 22;
  109.     authNameErr,                                    authNameErr, 23;
  110.     noAnsErr,                                            noAnsErr, 24;
  111.     dnrErr,                                                dnrErr, 25;
  112.     outOfMemory,                                    outOfMemory, 26;
  113.     errOpenCommandTimeout,                errOpenCommandTimeout, 27;
  114.     errMyMacHasNoDotName,                    errMyMacHasNoDotName, 28;
  115.     
  116.     
  117.     whichList, 0, kNntpErrorStrings;
  118.     errBadNntpServer,                            errBadNntpServer, 1;
  119.     errUnknownNntpError,                    errUnknownNntpError, 2;
  120.     errUnexpectedNntpError,             errUnexpectedNntpError, 3;
  121.     errBadNntpRespons,                        errBadNntpRespons, 4;    
  122.     errDebugOutput,                                errDebugOutput, 5;
  123.     errServiceAborted,                        errServiceAborted, 6;
  124.     errTooManyUsers,                            errTooManyUsers, 7;
  125.     errNntpServerFailed,                    errNntpServerFailed, 8;
  126.     errNntpBadGroup,                            errNntpBadGroup, 9;
  127.     errNntpPermissionDenied,            errNntpPermissionDenied, 10;
  128.     errNotAllowedToReadNews,            errNotAllowedToReadNews, 11;
  129.     errNotAllowedToPost,                    errNotAllowedToPost, 12;
  130.     errPostingFailed,                            errPostingFailed, 13;
  131.     errNoSuchArticle,                            errNoSuchArticle, 14;
  132.     errNewsServerNoKnownGroups,        errNewsServerNoKnownGroups, 15;
  133.     errMissingXHDRCommand,                 errMissingXHDRCommand, 16;
  134.     errBadPassword,                                errBadPassword, 17;
  135.     errNoListOfNewGroups,                    errNoListOfNewGroups, 18;
  136.     errCouldNotFindServer,                errCouldNotFindServer, 19;
  137.  
  138.     whichList, 0, kTPostErrorStrings;
  139.     errMissingYourName,                        errMissingYourName, 1;
  140.     errBadHeader,                                    errBadHeader, 2;
  141.     errCannotPostNonTextFiles,        errCannotPostNonTextFiles, 3;
  142.     errNoEditor,                                    errNoEditor, 4;
  143.     errArticleNotEdited,                    errArticleNotEdited, 5;
  144.     errCancelNotYourArticle,            errCancelNotYourArticle, 6;
  145.     
  146.     whichList, 0, kArticleViewErrorStrings;
  147.     errNoNoteFolder,                            errNoNoteFolder, 1;
  148.  
  149.     whichList, 0, kTExtractBinariesErrorStrings;
  150.     errBinariesMissingPart,                errBinariesMissingPart, 1;
  151.     errBinHexMultiSubjectError,        errBinHexMultiSubjectError, 2;
  152.     errBinHexBadSubject,                    errBinHexBadSubject, 3;
  153.     errBadBinaryFile,                            errBadBinaryFile, 4;
  154.     errNoBinaryFound,                            errNoBinaryFound, 5;
  155.     errNoExtractor,                                errNoExtractor, 6;
  156.     errBadBinHex,                                    errBadBinHex, 7;
  157.  
  158.     whichList, 0, kGroupErrorStrings;
  159.     errDatabaseScrambled,                    errDatabaseScrambled, 1;
  160.  
  161.     whichList, 0, kPrefsErrorStrings;
  162.     errNoSuchPrefs,                                errNoSuchPrefs, 1;
  163.     errIncompatiblePrefsFileFormat, errIncompatiblePrefsFileFormat, 2;
  164.     errScrambledPrefs,                        errScrambledPrefs, 3;
  165.  
  166.     whichList, 0, kMailErrorStrings;
  167.     errCannotUseAUX,                            errCannotUseAUX, 1;
  168.     errLaunchEudoraTimeout,                errLaunchEudoraTimeout, 2;
  169.     errBringEudoraToFrontTimeout,    errBringEudoraToFrontTimeout, 3;
  170.     errNoMailer,                                    errNoMailer, 4;
  171.     errNoMailerDoc,                                errNoMailerDoc, 5;
  172.  
  173.     whichList, 0, kMiscErrorStrings;
  174.     -43,                                                    -43, 1; // fnfErr
  175.     errIncompatibleFileFormat,        errIncompatibleFileFormat, 2;
  176.     errTooOldFileFormat,                    errTooOldFileFormat, 3;
  177.     errTooNewFileFormat,                    errTooNewFileFormat, 4;
  178.     -35,                                                    -35, 5; // no such volume
  179. }};
  180.  
  181. resource 'errs' (1129, "recovery", purgeable) {{
  182. // Groups
  183.     whichList, 0, kMiscRecoveryStrings;
  184.     errDatabaseScrambled,                    errDatabaseScrambled, 3;
  185.  
  186. // NNTP/MacTCP
  187.     whichList, 0, kMiscRecoveryStrings;
  188.     errNoSuchArticle,                            errNoSuchArticle, 1;
  189.     errDebugOutput,                                errDebugOutput, 2;
  190.  
  191.     whichList, 0, kNetworkRecoveryStrings;
  192.     commandTimeout,                                commandTimeout, 2;
  193.     kLastNntpError,                                kFirstNntpError, 1;
  194.     kLastMacTCPError,                            kFirstMacTCPError, 1;
  195. }};
  196.  
  197. //===================================== MISC ==============================
  198. resource 'STR#' (kMiscErrorStrings, "kMiscErrorStrings", purgeable) {{
  199.     "it was not found";
  200.     "it cannot be opened by this version of Nuntius"; // generic incompatible fileformat
  201.     "it was created by a too old version of Nuntius";
  202.     "it's created by a too new version of Nuntius. Please upgrade your version of Nuntius to the lastest one.";
  203.     "the specified volume doesn't exist";
  204. }};
  205.  
  206. resource 'STR#' (kMiscRecoveryStrings, "kMiscRecoveryStrings", purgeable) {{
  207.     ""; // no_recovery recovery string
  208.     "Please write a letter about this problem to the author of Nuntius: speck@dat.ruc.dk";
  209.     "Quit Nuntius, put the folder \"Nuntius public files\" in the trash, and "
  210.     /**/ "restart Nuntius. If this doesn't help, call your system administrator or write to "
  211.     /**/ "the author of Nuntius: speck@dat.ruc.dk";
  212. }};
  213. //==================================== NEWSAPPL ==========================
  214. resource 'STR#' (kTNewsApplMessageStrings, "TNewsApplMessageStrings", purgeable) {{
  215.     "open the group “^3”";
  216.     "get the list of all groups from the news server";
  217.     "update the list of all groups";
  218.     "use the server"; // news server
  219.     "open and update the group “^3”";
  220.     "update the news servers IP number (call your system administrator)";
  221. }};
  222.  
  223. resource 'STR#' (kPrefsMessageStrings, "kPrefsMessageStrings", purgeable) {{
  224.     "use the stored preferences";
  225.     "open or create the preferences document";
  226.     "read the preferences document";
  227.     "update the preferences document";
  228. }};
  229. resource 'STR#' (kPrefsErrorStrings, "kPrefsErrorStrings", purgeable) {{
  230.     "a preference did not exist (bug in Nuntius, please report to me: speck@dat.ruc.dk)";
  231.     "they were stored in an incompatible format.";
  232.     "the preferences seem to be scrambled";
  233. }};
  234.  
  235. resource 'STR#' (kGroupErrorStrings, "kGroupErrorStrings", purgeable) {{
  236.     "the group database is scrambled";
  237. }};
  238.  
  239. resource 'STR#' (kArticleViewMessageStrings, "kArticleViewMessageStrings", purgeable) {{
  240.     "show the articles";
  241.     "launch the extractor";
  242.     "expand the article";
  243.     "save the selection";
  244.     "create/open the note document";
  245. }};
  246. resource 'STR#' (kArticleViewErrorStrings, "kArticleViewErrorStrings", purgeable) {{
  247.     "you have not selected a folder for note documents. Choose \"Misc…\" from \"Prefs\" menu";
  248. }};
  249.  
  250. //============================ NETWORK =========================================
  251. resource 'STR#' (kNntpErrorStrings, "NntpErrorStrings", purgeable) {{
  252.     "the news server did not understand a command";
  253.     "an unknown response was received from the news server";
  254.     "an unexpected error message was received from the news server";
  255.     "an invalid response was received from the news server";
  256.     "some debug-output from the news server was not ignored (bug in Nuntius)";
  257.     "the news server discontinued the news service";
  258.     "the news server denies to support more concurrent requests";
  259.     "the news server could not perform a command";
  260.     "that group is not available at your news server";
  261.     "you were denied permission to do that";
  262.     "you are not allowed to read news from this news server";
  263.     "you do not have permission to post articles";
  264.     "the news server failed to post it";
  265.     "that article is not available from the news server";
  266.     "the news server doesn't seem useable.  It is missing basic groups.";
  267.     "the news server has not the standard 'XHDR' extension.";
  268.     "your password is incorrect";
  269.     "the list of new groups is unavailable from the news server";
  270.     "the server does not exist (could not get its dot address)";
  271. }};
  272.  
  273. resource 'STR#' (kMacTCPMessageStrings, "kMacTCPMessageStrings", purgeable) {{
  274.     "open MacTCP";
  275. }};
  276. resource 'STR#' (kMacTCPErrorStrings, "kMacTCPErrorStrings", purgeable) {{
  277.     "of the MacTCP error: bad network configuration";
  278.     "of the MacTCP error: bad IP configuration error";
  279.     "of the MacTCP error: missing IP or LAP configuration error";
  280.     "of error in MacTCP load";
  281.     "of error in getting address";
  282.     "the connection is closing";
  283.     "of the MacTCP error: invalid length";
  284.     "of the MacTCP error: request conflicts with existing connection";
  285.     "the connection does not exist";
  286.     "of the MacTCP error: insufficient resources to preform request";
  287.     "of the MacTCP error: invalidStreamPtr";
  288.     "of the MacTCP error: streamAlreadyOpen";
  289.     "the connection is terminated";
  290.     "of the MacTCP error: invalidBufPtr";
  291.     "of the MacTCP error: invalid RDS/WDS"; // 15
  292.     "this machine is not a news server (could not open an NNTP connection to it)";
  293.     "the connection to the news server timed out";
  294.     "of the MacTCP error: duplicate socket";
  295.     "the name of the server is not valid (syntax error)";
  296.     "cachefault: this error should never be reported as it is not an error";
  297.     "of the MacTCP error: noResultProc";
  298.     "MacTCP could not find a nameserver";
  299.     "its dot-name is not available";
  300.     "the *name* server did not respond (try typing its dot number instead)";
  301.     "of a generic Domain Name Resolver error";
  302.     "MacTCP did not have enough memory";
  303.     "the server does not respond";
  304.     "this Macintosh has no dot-name";
  305. }};
  306.  
  307. resource 'STR#' (kNetworkRecoveryStrings, "kNetworkRecoveryStrings", purgeable) {{
  308.     "Contact your system administrator.";
  309.     "Try increasing the timeout value in \"News server prefs\" from the \"Prefs\" menu.";
  310. }};
  311.  
  312. //=============================== SAVE ARTICLES/BINARIES =======================
  313. resource 'STR#' (kSaveArticlesErrorStrings, "SaveArticlesStrings", purgeable) {{
  314.     "save the articles";
  315. }};
  316.  
  317. resource 'STR#' (kTExtractBinariesMessageStrings, "TExtractBinariesMessageStrings", purgeable) {{
  318.     "extract the binaries";
  319. }};
  320. resource 'STR#' (kTExtractBinariesErrorStrings, "TExtractBinariesErrorStrings", purgeable) {{
  321.     "some of the parts are missing";
  322.     "the part specification in the subject lines cannot be parsed adequately";
  323.     "one of the subject lines contains garbage in the part specification";
  324.     "one of the files contains an error in the control lines";
  325.     "no binaries were found in the articles";
  326.     "you have not selected an extractor. Choose \"Binaries\" from the \"Prefs\" menu";
  327.     "the encoding of the binary is scrambled";
  328. }};
  329.  
  330. //================================== P O S T I N G  ===============================
  331. resource 'STR#' (kTPostMessageStrings, "kTPostMessageStrings", purgeable) {{
  332.     "post the article";
  333.     "launch the editor";
  334.     "post an article";
  335.     "get the signature";
  336.     "Trash the disk copy of the posted article";
  337. }};
  338. resource 'STR#' (kTPostErrorStrings, "kTPostErrorStrings", purgeable) {{
  339.     "you have not specified your name. Choose \"Your Name…\" from the \"Prefs\" menu.";
  340.     "bad header"; // alert is used for this error
  341.     "the article is not saved as \"plain text\"";
  342.     "you have not selected an editor. Choose \"Editing articles\" from \"Prefs\" menu";
  343.     "you have not edited the article";
  344.     "it is not posted by you";
  345. }};
  346.  
  347.  
  348. //===================================   M A I L   =========================
  349. resource 'STR#' (kMailMessageStrings, "kMailMessageStrings", purgeable) {{
  350.     "reply by mail";
  351.     "launch Eudora";
  352.     "cancel the article";
  353. }};
  354. resource 'STR#' (kMailErrorStrings, "kMailErrorStrings", purgeable) {{
  355.     "this hack cannot be used with A/UX";
  356.     "<I don't know>. Launch Eudora yourself";
  357.     "<I don't know>. Something unknown went wrong";
  358.     "you have not selected a mailer. Choose \"Mail\" from \"Prefs\" menu";
  359.     "you have not selected a document to launch the mailer with. Choose \"Mail\" from \"Prefs\" menu";
  360. }};
  361.  
  362.  
  363. //===================================== PREFERENCES =========================
  364.  
  365. resource 'STR#' (kYourNameErrorStrings, "kYourNameErrorStrings", purgeable) {{
  366.     "Please specify your full name.";
  367.     "Can't do it with a '@', keep it for your e-mail address";
  368.     "Can't do it without a '@'"; // not used!
  369.     "You may not use '<' or '>' here!";
  370.     "The number of )s must match the number of (s.";
  371. }};
  372.  
  373. resource 'STR#' (kYourSnailErrorStrings, "kYourSnailErrorStrings", purgeable) {{
  374.     "You must have an e-mail address. Please specify it.";
  375.     "Can't do it with more than one '@' in an e-mail address";
  376.     "Can't do it without a '@' in an e-mail address";
  377.     "You may not use '<' or '>' here, I take care of those!";
  378.     "The number of )s must match the number of (s.\n\nPS. Nesting is allowed.";
  379. }};
  380.  
  381. resource 'STR#' (kOrganizErrorStrings, "kOrganizErrorStrings", purgeable) {{
  382.     "Please specify the name of your organization or affiliation.";
  383.     "Can't do it with a '@'"; // not used
  384.     "Can't do it without a '@'"; // not used!
  385.     "You may not use '<' or '>' here!"; // not used
  386.     "The number of )s must match the number of (s.\n(Nesting is allowed)";
  387. }};
  388.  
  389.